package cn.zwx.zookeeper.config.example;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * @author zhangwenxue
 */
@SpringBootApplication
public class ZookeeperConfigExampleApplication {

    private static final Logger logger = LoggerFactory.getLogger(ZookeeperConfigExampleApplication.class);


    public static void main(String[] args) {
        ConfigurableApplicationContext applicationContext = SpringApplication.run(ZookeeperConfigExampleApplication.class, args);
        logger.info("ZookeeperConfigExampleApplication 启动成功！！！");
//        System.out.println(applicationContext.getBean(ZookeeperConfig.class));
//        // 测试zookeeper 链接
//        ZookeeperConnectHandler zookeeperConnectHandler = new ZookeeperConnectHandler(applicationContext.getBean(ZookeeperConfig.class));
//        CuratorFramework curatorFramework = zookeeperConnectHandler.getCuratorFramework();
//        curatorFramework.start();
    }

}
